package la.common;

import java.util.Collection;
import java.util.Iterator;

public class ToStringHelper {
	public static StringBuilder col2Str(Collection<?> col, String separator) {
		StringBuilder result = new StringBuilder();
		result.append( "(" );
		
		Iterator<?> i = col.iterator();
		while( i.hasNext() ) {
			result.append( i.next() );
			if( i.hasNext() ) {
				result.append( separator );
			}
		}
		result.append( ")" );
		return result;
	}
}
